package com.pingan.springboot_es_api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.frameworkset.orm.annotation.Column;
import com.frameworkset.orm.annotation.ESParentId;
import org.frameworkset.elasticsearch.entity.ESBaseData;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by Kay on 2018/11/1
 * 诊断信息 ，子表，与父表用party_id 关联
 */
public class Diagnosis implements Serializable {
    private static final long  serialVersionUID = 1L;
    @ESParentId
    private String party_id;          //父id
    private String provider;            //诊断医院
    private String subject;             //科室
    private Integer age;   // 排序用,已经不再使用
    private String icd_code;          // icd编码
    private String sd_disease_nm;     // 疾病名称
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(dataformat = "yyyy-MM-dd HH:mm:ss")
    private Date created_date;          // 诊断日期
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(dataformat = "yyyy-MM-dd HH:mm:ss")
    private Date last_modified_date;          //最后修改日期
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(dataformat = "yyyy-MM-dd HH:mm:ss")
    private Date etl_dt;                      //etl时间戳

    public Diagnosis() {
    }

    public Diagnosis(String party_id, String provider, String subject, Integer age, String icd_code, String sd_disease_nm, Date created_date, Date last_modified_date, Date etl_dt) {
        this.party_id = party_id;
        this.provider = provider;
        this.subject = subject;
        this.age = age;
        this.icd_code = icd_code;
        this.sd_disease_nm = sd_disease_nm;
        this.created_date = created_date;
        this.last_modified_date = last_modified_date;
        this.etl_dt = etl_dt;
    }

    public String getParty_id() {
        return party_id;
    }

    public void setParty_id(String party_id) {
        this.party_id = party_id;
    }

    public String getProvider() {
        return provider;
    }

    public void setProvider(String provider) {
        this.provider = provider;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getIcd_code() {
        return icd_code;
    }

    public void setIcd_code(String icd_code) {
        this.icd_code = icd_code;
    }

    public String getSd_disease_nm() {
        return sd_disease_nm;
    }

    public void setSd_disease_nm(String sd_disease_nm) {
        this.sd_disease_nm = sd_disease_nm;
    }

    public Date getCreated_date() {
        return created_date;
    }

    public void setCreated_date(Date created_date) {
        this.created_date = created_date;
    }

    public Date getLast_modified_date() {
        return last_modified_date;
    }

    public void setLast_modified_date(Date last_modified_date) {
        this.last_modified_date = last_modified_date;
    }

    public Date getEtl_dt() {
        return etl_dt;
    }

    public void setEtl_dt(Date etl_dt) {
        this.etl_dt = etl_dt;
    }

    @Override
    public String toString() {
        return "Diagnosis{" +
                "party_id='" + party_id + '\'' +
                ", provider='" + provider + '\'' +
                ", subject='" + subject + '\'' +
                ", age=" + age +
                ", icd_code='" + icd_code + '\'' +
                ", sd_disease_nm='" + sd_disease_nm + '\'' +
                ", created_date=" + created_date +
                ", last_modified_date=" + last_modified_date +
                ", etl_dt=" + etl_dt +
                '}';
    }
}
